doctype html
html(lang="zh-CN")
    head
        meta(charset="UTF-8")
        title=title
    body
        div
            a(href="https://www.baidu.com",target="_blanks") baidu
            h1=1 + 3
        p
            span title #{title}
        p
            a(href="/blog/" + subjects.id) id
        p
            span title #{subjects.English}
        div= 'If you think you can,<b>you can</b>.'
        div= 'If you think you can' + ', <b>you can</b>.'
        div!= 'If you think you can' + ', <b>you can</b>.'
        p
            button(disabled=true) Click Me
            button(disabled=false) Click Me
            button Click Me
        div(style={color: 'red', padding: '10px 5px'}) Style attributes
        div
            img(src="/images/b.png")
            br
            img(src="/images/a.png")/
        | this is HTML element, <a href="http://staticfile.org" target="_blank">七牛云</a>
        - for(var i = 0; i < 3; i++)
          div This is div element #{i}
        - var n = 3;
        - for(var i = 0; i < n; i++)
              div This is element #{i}
         - var ary = ['One', 'Two', 'Three'];
              each item in ary
               div= item
         - var ary = ['One', 'Two', 'Three'];
              each item, index in ary
                 div= index +":"+item
         - var obj = {'one': 1, 'two': 2, 'three': 3};
            each val, key in obj
              div= key + ':' + val
          - var n = 0;
            while n < 3
              div= n++
         - var bl0 = false, bl1 = true;
           if bl0
             div bl0 is true
           else if bl1
             div bl1 is true
           else
             div all are false
         - var gender = 1;
           case gender
              when 0
                 div you are a girl
               default
                   div you are a boy
           // if you think you can, you can
           //
               if you think you can,
                   you can
           //- if you think you can,
        div you can
        div my name is #{name}
           //mixin showName
           //    div CYF
           //+showName
           //+showName
        mixin showName(name)
            div(title!=attributes.title,style=attributes.style)= name
            if block
                block
        +showName('CYF')
        div this is CYF block
        +showName('Cao Yongfeng')(title='this is my title',style={color:'red',padding:'10px 5px',background:'#f9efd4'})
        div this is Cao Yong feng block
        mixin list(id, ...items)
           ul(id=id)
               each item in items
                    li= item
        +list('mylist', 1, 2, 3)

























    script(type="text/javascript").
            window.onload = function () {
                console.log('hello jade');
            };